#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
void test_vector1()
{
	vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(4);
	for (size_t i = 0; i < v1.size(); i++)
	{
		cout << v1[i] << " ";
	}
	cout << endl;
	for (auto e : v1)
	{
		cout << e << " ";
	}
}
void test_vector2()
{
	vector<string> v2;
	string s1("li si");
	v2.push_back(s1);
	v2.push_back(string("zhan san"));

	v2.push_back("wang wu");
	v2[1] += "?";
	for (const auto& e : v2)
	{
		cout << e << " ";
	}
}
void test_vector3()
{
	vector<int> v3;
	greater<int> gt;
	v3.push_back(1);
	v3.push_back(32);
	v3.push_back(45);
	v3.push_back(121);
	v3.push_back(22);
	v3.push_back(3);
	v3.push_back(1123);
	sort(v3.begin(), v3.end(),gt);
	for (auto e : v3)
	{
		cout << e << " ";
	}
}
int main()
{
	test_vector3();
	return 0;
}